package com.bai.serviceUtil.erro;

import lombok.Data;

/**
 * 自定义异常处理
 */

@Data
public class BaiExcetion extends RuntimeException {

    private Integer code;//状态码
    private String msg;//描述信息

    public BaiExcetion(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "BaiExcetion{" +
                "code=" + code +
                ", msg='" + this.getMsg() + '\'' +
                '}';
    }
}
